/**
 * @author wn
 * @date 2024/04/03 11:27:47
 * @description: 订单 API 接口
 */

import { request } from '@/utils/request'

const Url = {
	orderList: '/order/list', // 获取订单列表
	orderDetail: '/order/detail', // 获取订单详情
}

/**
 * 获取订单列表
 * @returns Promise
 */
export const getOrderListApi = (state = '') =>
	request({
		url: Url.orderList,
		data: { state },
	})

/**
 * 获取订单详情
 * @param {*} oid
 * @returns Promise
 */
export const getOrderDetailApi = oid =>
	request({
		url: Url.orderDetail,
		data: { oid },
	})
